//
//  UIView+Extension.swift
//  个人微博
//
//  Created by guo3920591 on 16/4/16.
//  Copyright © 2016年 guo3920591. All rights reserved.
//

import UIKit


extension UIView {
    //边框
    @IBInspectable var boardWith: CGFloat{
        
        set{
           
            self.layer.borderWidth = newValue
          
        }
        

        get{
            
            return self.layer.borderWidth
        }
        
        
        
    }
    //边框颜色
    
    @IBInspectable var boardColor: UIColor{
        
        get{
           
            
            return UIColor(CGColor: self.layer.borderColor!)
            
        }
        
        set{
            
            
            self.layer.borderColor = newValue.CGColor
            
        }
        
        
        
    }
    
    //倒角
    
    @IBInspectable var coranders: CGFloat {
        
        get{
            
            return self.layer.cornerRadius
        }
        
        
        set{
            
            self.layer.cornerRadius = newValue
            
            self.layer.masksToBounds = (newValue>0)
            
        }
    }
    
    
    
}